package com.jyx.framework.domain.course;

import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;


import javax.persistence.*;
import java.io.Serializable;

@Data
@ToString
@Entity
@Table(name = "category")
@GenericGenerator(name="jpa-assigned",strategy = "assigned")
public class Category implements Serializable {
    private static final long serialVersionUID = -906357110051689484L;
    /**
     *  `id` varchar(32) NOT NULL COMMENT '主键',
     *   `name` varchar(32) NOT NULL COMMENT '分类名称',
     *   `label` varchar(32) DEFAULT NULL COMMENT '分类标签默认和名称一样',
     *   `parentid` varchar(32) DEFAULT NULL COMMENT '父结点id',
     *   `isshow` char(1) DEFAULT NULL COMMENT '是否显示',
     *   `orderby` int(4) DEFAULT NULL COMMENT '排序字段',
     *   `isleaf` char(1) DEFAULT NULL COMMENT '是否叶子',
     */
    @Id
    @GeneratedValue(generator = "jpa-assigned")
    @Column(length = 32)
    private String id;
    private String name;
    private String label;
    private String parentid;
    private String isshow;
    private Integer orderby;
    private String isleaf;
}
